<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
<head>
<meta charset="UTF-8">
	<link th:href="@{/bootstrap/dist/css/bootstrap.css}" rel="stylesheet">
	<!--<link th:href="@{/bootstrap/dist/css/bootstrap-theme.css}" rel="stylesheet">-->
	<link th:href="@{/css/index.css}" rel="stylesheet">
	<script th:src="@{/js/jquery-2.1.4.js}"></script>
	<script th:src="@{/bootstrap/dist/js/bootstrap.js}"></script>
<title>INDEX</title>
</head>
<body>
	<div class="row">
		<button id="relationExtraction" type="button">关系抽取</button>
		<button id="viewGraph" type="button">查看图谱</button>
		<input id="input_url" type="text" name="inputUrl" placeholder="CURRENT URL" disabled="disabled">
	</div>

	<div class="row outbox">
		<iframe id="mainframe" name="mainframe" width="100%" height="1000px"
			frameborder="0" src="" seamless>Loading ...</iframe>
	</div>

	<script type="text/javascript">
		var url01 = "relation-extraction";
		var url02 = "view-graph";
		$("button").click(function() {
			var valId = $(this).attr("id");
			var currentUrl;
			
			if (valId == "relationExtraction") {
				currentUrl = url01;
			} else if (valId == "viewGraph") {
				currentUrl = url02;
			} 
						$("#mainframe").attr("src", currentUrl);
			$("#input_url").val(currentUrl);
		});
	</script>
</body>
</html>